Maybe Array Length is Negative (MALN)

Description:

MALN detects if the range of the length expression of the created array may contain negative values, so it is possible that the length of the created array will be negative. It will not report this message if the minimum value of the length is less than -127 (to avoid messages for all expressions of sign types).

Incorrect:

char[] create(int len) {
    if (len >= 0) {
        return new char[len - 1];
    }
    return null;
}